home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / language / modula.zoo / _defn_ex_gemaesba.def < prev    next >
Text File  |  1988-04-24  |  11KB  |  334 lines

  1. DEFINITION MODULE GEMAESbase;
  2.  
  3. (* ------------------------------------------------------------- *)
  4. (*                                                               *)
  5. (*  Modula-2 interface to GEM Application Environment Services   *)
  6. (*                                                               *)
  7. (* ------------------------------------------------------------- *)
  8.  
  9. (* ------------------------------------------------------------- *)
  10. (* (c) Copyright Lehrstuhl für Prozeßrechner   TU München   1987 *)
  11. (* ------------------------------------------------------------- *)
  12.  
  13.  
  14.  
  15. FROM SYSTEM IMPORT ADDRESS;
  16.  
  17. (* ---------------------------------------------------------- *)
  18.  
  19.  
  20. CONST
  21.   (* Resource manager definitions *)
  22.  
  23.   RTree        =  0;
  24.   RObject      =  1;
  25.   RTedInfo     =  2;
  26.   RIconBlock   =  3;
  27.   RBitBlock    =  4;
  28.   RString      =  5;
  29.   RImageData   =  6;
  30.   RObSpec      =  7;
  31.   RText        =  8;
  32.   RTemplate    =  9;
  33.   RValid       = 10;
  34.   RIconBlkMask = 11;
  35.   RIconBlkData = 12;
  36.   RIconBlkText = 13;
  37.   RBitBlkData  = 14;
  38.   RFreeString  = 15;
  39.   RFreeImage   = 16;
  40.  
  41.  
  42.   (* Object types *)
  43.  
  44.   GraphicBox              = 20;  (* Graphic box *)
  45.   GraphicText             = 21;  (* Graphic text string *)
  46.   GraphicBoxText          = 22;  (* Graphic box containing text *)
  47.   GraphicImage            = 23;  (* Graphic bit image *)
  48.   GraphicProgDef          = 24;  (* Programmer defined graphic object *)
  49.   GraphicInvisibleBox     = 25;  (* Invisible interior graphic box *)
  50.   GraphicButton           = 26;  (* Text within an invisible box *)
  51.   GraphicBoxChar          = 27;  (* Graphic box containing graphic char *)
  52.   GraphicString           = 28;  (* Graphic text string *)
  53.   GraphicFormattedText    = 29;  (* Formatted graphic text *)
  54.   GraphicFormattedBoxText = 30;  (* Formatted text within a box *)
  55.   GraphicIcon             = 31;  (* Object that describes an icon *)
  56.   GraphicTitle            = 32;  (* Graphic text string used for menu title *)
  57.  
  58.   None        =  00H;                  (* Object flags *)
  59.   Selectable  =  01H;
  60.   Default     =  02H;
  61.   Exit        =  04H;
  62.   Editable    =  08H;
  63.   RadioButton =  10H;
  64.   LastObject  =  20H;
  65.   TouchExit   =  40H;
  66.   HideTree    =  80H;
  67.   Indirect    = 100H;
  68.  
  69.   Normal      =  00H;                  (* Object states *)
  70.   Selected    =  01H;
  71.   Crossed     =  02H;
  72.   Checked     =  04H;
  73.   Disabled    =  08H;
  74.   Outlined    =  10H;
  75.   Shadowed    =  20H;
  76.  
  77.   White        =  0;                    (* Object colours *)
  78.   Black        =  1;
  79.   Red          =  2;
  80.   Green        =  3;
  81.   Blue         =  4;
  82.   Cyan         =  5;
  83.   Yellow       =  6;
  84.   Magenta      =  7;
  85.   LightWhite   =  8;                   (* Same as white *)
  86.   LightBlack   =  9;                   (* Same as black *)
  87.   LightRed     = 10;
  88.   LightGreen   = 11;
  89.   LightBlue    = 12;
  90.   LightCyan    = 13;
  91.   LightYellow  = 14;
  92.   LightMagenta = 15;
  93.  
  94. CONST
  95.   (* Event manager definitions *)
  96.   KeyboardEvent = 01H;       (* Wait for keyboard event *)
  97.   ButtonEvent   = 02H;       (* Wait for mouse button event *)
  98.   Mouse1Event   = 04H;       (* Wait for mouse/rectangle event 1 *)
  99.   Mouse2Event   = 08H;       (* Wait for mouse/rectangle event 2 *)
  100.   MesageEvent   = 10H;       (* Wait for a message event *)
  101.   TimerEvent    = 20H;       (* Wait for a timer event *)
  102.  
  103.   (* Keyboard states *)
  104.   KeyRightShift = 01H;
  105.   KeyLeftShift  = 02H;
  106.   KeyCTRL       = 04H;
  107.   KeyALT        = 08H;
  108.  
  109.   (* Message values *)
  110.   MenuSelected      = 10;    (* Menu item was selected *)
  111.   WindowRedraw      = 20;    (* Window needs redrawing *)
  112.   WindowTopped      = 21;    (* A window was moved to the top *)
  113.   WindowClosed      = 22;    (* Window was closed *)
  114.   WindowFulled      = 23;    (* Wndow was fulled *)
  115.   WindowArrowed     = 24;    (* Window was arrowed *)
  116.   WindowHorizSlided = 25;    (* Horizontal slider was moved *)
  117.   WindowVertSlided  = 26;    (* Vertical slider was moved *)
  118.   WindowSized       = 27;    (* Window was sized *)
  119.   WindowMoved       = 28;    (* Window was moved *)
  120.   WindowNewTop      = 29;    (* Window was moved to top (activated) *)
  121.   AccessoryOpen     = 40;    (* Accessory requested to open *)
  122.   AccessoryClose    = 41;    (* Accessory requested to close *)
  123.  
  124.  
  125.   (* Graphics manager definitions *)
  126.   Arrow       = 0;             (* Mouse forms *)
  127.   TextCursor  = 1;
  128.   HourGlass   = 2;
  129.   PointHand   = 3;
  130.   FlatHand    = 4;
  131.   ThinCross   = 5;
  132.   ThickCross  = 6;
  133.   OutlineCross= 7;
  134.   UserDef     = 255;
  135.   MouseOff    = 256;
  136.   MouseOn     = 257;
  137.  
  138.  
  139.   (* Form manager definitions *)
  140.   FormStart   = 0;             (* Reserve screen area for dialog box *)
  141.   FormGrow    = 1;             (* Grow the dialog box *)
  142.   FormShrink  = 2;             (* Shrink the dialog box *)
  143.   FormFinish  = 3;             (* Tell application to redraw window *)
  144.  
  145.  
  146.   (* Window attributes, used for CreateWindow call *)
  147.   Name       = 001H;    (* Title bar with name *)
  148.   Closer     = 002H;    (* Close box *)
  149.   Fuller     = 004H;    (* Full box *)
  150.   Mover      = 008H;    (* Move box *)
  151.   InfoLine   = 010H;    (* Information line *)
  152.   Sizer      = 020H;    (* Size box *)
  153.   UpArrow    = 040H;    (* Up arrow *)
  154.   DownArrow  = 080H;    (* Down arrow *)
  155.   VertSlide  = 100H;    (* Vertical slider *)
  156.   LeftArrow  = 200H;    (* Left arrow *)
  157.   RightArrow = 400H;    (* Right arrow *)
  158.   HorizSlide = 800H;    (* Horizontal slider *)
  159.  
  160.   (* Window create flags *)
  161.   WCBorder   = 0;
  162.   WCWork     = 1;
  163.  
  164.   (* Window get flags *)
  165.   WindowKind      =   1;    (* Kind of window *)
  166.   WindowName      =   2;    (* Name of window *)
  167.   WindowInfo      =   3;    (* Window information *)
  168.   WorkXYWH        =   4;    (* Get windows working origin and extent *)
  169.   CurrXYWH        =   5;    (* Get windows entire origin and extent *)
  170.   PrevXYWH        =   6;    (* Get windows previous origin and extent *)
  171.   FullXYWH        =   7;    (* Get windows full origin and extent *)
  172.   WindowHorizSlide=   8;    (* Get windows horizontal slider position *)
  173.   WindowVertSlide =   9;    (* Get windows vertical slider position *)
  174.   Top             =  10;    (* Get handle of window that is on top (active) *)
  175.   FirstXYWH       =  11;    (* Get first rectangle in list of window *)
  176.   NextXYWH        =  12;    (* Get next rectangle in list of window *)
  177.   Reserved        =  13;    (* Reserved *)
  178.   NewDesk         =  14;    (* Info on new desk *)
  179.   HorizSliderSize =  15;    (* Size of horizontal slider *)
  180.   VertSliderSize  =  16;    (* Size of vertical slider *)
  181.   WindowScreen    =  17;    (* Get info on screen *)
  182.   
  183.   (* update flags *)
  184.   EndUpdate         = 0;    (* Tell GEM window update is complete *)
  185.   BeginUpdate       = 1;    (* Tell GEM application is updating a window *)
  186.   EndMoueControl    = 3;    (* Tell GEM that it controls the mouse *)
  187.   BeginMouseControl = 4;    (* Tell GEM that application controls mouse *)
  188.  
  189.  
  190. (* Object definitions *)
  191.  
  192. TYPE
  193.  
  194.   Object   = RECORD
  195.                next:         CARDINAL;
  196.                head:         CARDINAL;
  197.                tail:         CARDINAL;
  198.                type:         CARDINAL;
  199.                flags:        CARDINAL;
  200.                state:        CARDINAL;
  201.                spec:         ADDRESS;
  202.                x, y:         CARDINAL;
  203.                width:        CARDINAL;
  204.                height:       CARDINAL;
  205.              END;
  206.  
  207.  
  208.   TEdInfo  = RECORD
  209.                ptext:        ADDRESS;
  210.                ptmplt:       ADDRESS;
  211.                pvalid:       ADDRESS;
  212.                font:         CARDINAL;
  213.                junkl:        CARDINAL;
  214.                just:         CARDINAL;
  215.                color:        CARDINAL;
  216.                junk2:        CARDINAL;
  217.                thickness:    CARDINAL;
  218.                txtlen:       CARDINAL;
  219.                tmplen:       CARDINAL
  220.              END;
  221.  
  222.  
  223.   IconBlk  = RECORD
  224.                pmask:        ADDRESS;
  225.                pdata:        ADDRESS;
  226.                ptext:        ADDRESS;
  227.                iChar:        INTEGER;
  228.                xChar:        INTEGER;
  229.                yChar: